import { http } from "@/uni-sub-base/service/request.js"

let serviceName = "Member/"
import { getBaseUrls } from "@/utils/appUrl.js"

//获取会员购物车
export function getUserCarList(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getUserCarList",
        data,
    })
}
//获取会员收货地址列表
export function getReceivingAddressList(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getReceivingAddressList",
        data,
    })
}
//编辑收货地址
export function userAddressAddOrEdit(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "userAddressAddOrEdit",
        data,
    })
}
//删除收货地址
export function userAddressDelete(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "userAddressDelete",
        data,
    })
}
//获取区域控件获取列表
export function GetCountrywideListBySelRegion(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getCountrywideListBySelRegion?parentId=" + data.parentId,
        data,
    })
}
//识别地址
export function BatchSmartParse(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "BatchSmartParse",
        data,
    })
}
//收藏
export function addProductToFavorite(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "addProductToFavorite",
        data,
    })
}
//加入购物车
export function addOrUpdateAmount(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "addOrUpdateAmount",
        data,
    })
}
//加入购物车
export function addOrEditUserCarList(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "addOrEditUserCarList",
        data,
    })
}
//删除、清空 购物车
export function deleteUserCar(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "deleteUserCar?ids=" + data.ids,
        data,
    })
}
//获取要结算的订单信息
export function getSubmitOrderData(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getSubmitOrderData",
        data,
    })
}
//获取要结算的订单信息
export function getMemberCenterInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getMemberCenterInfo",
        data,
    })
}
//再次购买
export function BuyAgain(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "BuyAgain?orderId=" + data.orderId,
        data,
    })
}

//获取要结算的订单信息
export function getMemberDetail(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getMemberDetail",
        data,
    })
}
//获取我的财务
export function getAccountBalance(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getAccountBalance",
        data,
    })
}
//获取个人信息
export function GetMemberDetail(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetMemberDetail",
        data,
    })
}
//保存个人信息
export function SubmitMemberDetail(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "SubmitMemberDetail",
        data,
    })
}
//修改密码
export function ChangePwd(path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "ChangePwd" + path,
    })
}

//修改密码
export function addTempCar(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "SubmitMemberDetail",
        data,
    })
}

//充值提交
export function ApplyRecharge(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "ApplyRecharge",
        data,
    })
}

export function GetInitRechargeDetail(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetInitRechargeDetail",
        data,
    })
}

//充值记录列表
export function GetUserMoneyLogList(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetUserMoneyLogList",
        data,
    })
}
//提交凭证
export function submitVoucher(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "submitVoucher",
        data,
    })
}
//充值明细-返点明细 余额
export function GetUerBalanceByMoneyType(path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetUerBalanceByMoneyType" + path,
    })
}
//充值明细-返点明细
export function GetWholeSaleMoneyList(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetWholeSaleMoneyList",
        data,
    })
}
//校验是否已注册
export function judgeIsExist(data) {
    console.log(data)
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "JudgeIsExist?username=" + data,
        data: {},
    })
}
//获取运费费用信息
export function StatisPostageMoneyByUserCar(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "StatisPostageMoneyByUserCar",
        data,
    })
}
//获取商户退货地址
export function GetReturnAddress(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetReturnAddress",
        data,
    })
}
